package org.yi.fc.entity;

import javax.servlet.http.HttpServletRequest;

import org.yi.fc.model.Pager;
import org.yi.fc.utils.ParamUtils;

import com.jfinal.plugin.activerecord.Model;
import com.jfinal.plugin.activerecord.Page;

public class FFriendLink extends Model<FFriendLink>{

	private static final long serialVersionUID = 1L;
	
	public static final FFriendLink dao = new FFriendLink();
	
	public void save(HttpServletRequest request) {
		set("keyword", ParamUtils.get(request, "keyword"));
		set("url", ParamUtils.get(request, "url"));
		set("logo", ParamUtils.get(request, "logo"));
		save();
	}
	
	public Page<FFriendLink> getPager(Pager pager) {
		return FFriendLink.dao.paginate(pager.getPn(), pager.getSize(), "select *", "from f_friend_link");
	}
	
}
